package com.bitejiuyeke.job_publish.service;

import com.bitejiuyeke.job_publish.common.PageResult;
import com.bitejiuyeke.job_publish.model.Offer;
import org.springframework.transaction.annotation.Transactional;

public interface IOfferService {

    /**
     * 添加Offer记录
     * @param offer
     */
    @Transactional
    void create(Offer offer);

    /**
     * 根据Id查询Offer详情
     * @param id OfferId
     * @return Offer
     */
    Offer selectById (Long id);

    /**
     * 修改Offer状态
     * @param record Offer
     */
    @Transactional
    void modifyState(Offer record);

    /**
     * 投递者查询Offer总数
     * @param record
     * @return
     */
    int selectTotalByUser(Offer record);

    /**
     * 投递者查询Offer分页列表
     * @param record
     * @return
     */
    PageResult<Offer> selectPageByUser (Offer record);
}